/*
 * Copyright 2015-2102 RonCoo(http://www.roncoo.com) Group.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.roncoo.pay.permission.service;

import com.roncoo.pay.common.core.page.PageBean;
import com.roncoo.pay.common.core.page.PageParam;
import com.roncoo.pay.permission.entity.PmsOperator;

/**
 * 操作员service接口
 * <p>
 * 龙果学院：www.roncoo.com
 *
 * @author：shenjialong
 */
public interface PmsOperatorService {

    /**
     * 创建pmsOperator
     */
    void saveData(PmsOperator pmsOperator);

    /**
     * 修改pmsOperator
     */
    void updateData(PmsOperator pmsOperator);

    /**
     * 根据id获取数据pmsOperator
     *
     * @param id
     * @return
     */
    PmsOperator getDataById(Long id);

    /**
     * 根据登录名取得操作员对象
     */
    public PmsOperator findOperatorByLoginName(String loginName);

    /**
     * 分页查询pmsOperator
     *
     * @param pageParam
     * @param ActivityVo PmsOperator
     * @return
     */
    PageBean listPage(PageParam pageParam, PmsOperator pmsOperator);

    /**
     * 根据ID删除一个操作员，同时删除与该操作员关联的角色关联信息. type="admin"的超级管理员不能删除.
     *
     * @param id 操作员ID.
     */
    public void deleteOperatorById(Long operatorId);

    /**
     * 根据操作员ID更新操作员密码.
     *
     * @param operatorId
     * @param newPwd     (已进行SHA1加密)
     */
    public void updateOperatorPwd(Long operatorId, String newPwd);

    /**
     * 保存操作員信息及其关联的角色.
     *
     * @param pmsOperator     .
     * @param roleOperatorStr .
     */
    public void saveOperator(PmsOperator pmsOperator, String roleOperatorStr);

    /**
     * 修改操作員信息及其关联的角色.
     *
     * @param pmsOperator     .
     * @param roleOperatorStr .
     */
    void updateOperator(PmsOperator pmsOperator, String roleOperatorStr);

}
